trigger:
  batch: false
  branches:
    include:
    - main
    - release/*.*
  paths:
    include:
    - src/coreclr/jit/*
    - src/coreclr/inc/jiteeversionguid.h

# This pipeline is supposed to be run only on merged changes
# and should not be triggerable from a PR.
pr: none

variables:
  - template: /eng/pipelines/common/variables.yml

extends:
  template:  /eng/pipelines/common/templates/pipeline-with-resources.yml
  parameters:
    stages:
    - stage: Build
      jobs:
      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/global-build-job.yml
          buildConfig: checked
          platforms:
          - osx_arm64
          - osx_x64
          - linux_arm
          - linux_arm64
          - linux_x64
          - windows_x64
          - windows_x86
          - windows_arm64
          jobParameters:
            disableComponentGovernance: true # Not a shipping artifact
            buildArgs: -s clr.alljits+clr.spmi -c $(_BuildConfig)
            postBuildSteps:
              - template: /eng/pipelines/coreclr/templates/upload-jits-steps.yml
            extraVariablesTemplates:
              - template: /eng/pipelines/coreclr/templates/jit-python-variables.yml

      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/global-build-job.yml
          buildConfig: release
          platforms:
          - osx_arm64
          - osx_x64
          - linux_arm
          - linux_arm64
          - linux_x64
          - windows_x64
          - windows_x86
          - windows_arm64
          jobParameters:
            disableComponentGovernance: true # Not a shipping artifact
            buildArgs: -s clr.alljits+clr.spmi -c $(_BuildConfig) /p:NoPgoOptimize=true
            postBuildSteps:
              - template: /eng/pipelines/coreclr/templates/upload-jits-steps.yml
            extraVariablesTemplates:
              - template: /eng/pipelines/coreclr/templates/jit-python-variables.yml
